#include<iostream>
#include<fstream>
#include<conio.h>

using namespace std;


class Singleton
{
private:
    static bool instanceFlag;
    static Singleton *single;
    Singleton()
    {
        
    }
public:
    static Singleton* getInstance();
    void ProceseazaClienti();
	void Exemplu();
    ~Singleton()
    {
        instanceFlag = false;
    }
};






class Masina
{
protected:
char culoare[20];
char transmisie[20];
public:
	Masina(char *x,char *p)
		{  
			strcpy(culoare,x);strcpy(transmisie,p);
		}
	virtual void PrintProductInfo()
		{
			cout<<culoare<<":"<<transmisie<<" lei";
		}
	virtual void tip()=0;

};

class sedan: public Masina
{
char clima[20];
char securitate[20];
char divertisment[20];

public:
   sedan(char *culoare,char *transmisie,char *c, char *s, char *d):Masina(culoare,transmisie)
   {strcpy(clima,c);
	strcpy(securitate,s);
	strcpy(divertisment,d);
   }
   void PrintProductInfo()
   {cout<<culoare<<", Transmisie:"<<transmisie<<"+"<<securitate<<"+"<<divertisment<<"\n";}
   void tip()
   {cout<<"Sedan:";}
};

class coupe: public Masina
{
int garantie;
int acoperis_decapotabil;
float cap_cilindrica;

public:
	coupe(char *culoare,char* transmisie,int g,int a,float c):Masina (culoare,transmisie)
	{garantie=g;
	 acoperis_decapotabil=a;
	 cap_cilindrica=c;
	}
    void PrintProductInfo()
    {cout<<culoare<<", Transmisie:"<<transmisie<<" ,Cilindree:"<<cap_cilindrica<<"Garantie:"<<garantie<<"ani\n";}
    void tip()
	{
		if(acoperis_decapotabil)
			cout<<"Coupe(decapotabila):";
		else
			cout<<"Coupe:";
	}
};
class mini: public Masina
{
float cap_cilindrica;
char  clima[20];
int turbo;
public:
	mini(char *culoare,char* transmisie,float g,char *c,int t):Masina (culoare,transmisie)
	{cap_cilindrica=g;
	strcpy(clima,c);
	turbo=t;}
    void PrintProductInfo()
    {
	if(turbo)	
	cout<<culoare<<", Transmisie:"<<transmisie<<" capacitatea cilindrica "<<cap_cilindrica<<" cm3(+turbo) cu "<<clima<<"\n";
	else
	cout<<culoare<<", Transmisie:"<<transmisie<<" capacitatea cilindrica "<<cap_cilindrica<<" cm3 cu "<<clima<<"\n";
	}
    void tip()
	{cout<<"Mini:";}
};


struct nod
{
Masina *p;
nod *next;
};
typedef nod* lista;

class Client
{lista head;
char* name;
int varsta;
public:
	Client(char *s,int x)
	{name=s;varsta=x;head=NULL;}
    
	void addArticol (char *culoare, char* transmisie, char *clima, char *securitate, char *divert);
    void addArticol (char *culoare,char* transmisie,int g,int a,float c);
	void addArticol (char *culoare,char* transmisie,float g,char *c,int t);

	void Print();
	


};